package net.maku.module.service;

import jakarta.servlet.http.HttpServletRequest;
import net.maku.framework.common.utils.PageResult;
import net.maku.framework.common.utils.Result;
import net.maku.framework.mybatis.service.BaseService;
import net.maku.module.entity.AgCategoryEntity;
import net.maku.module.query.AgCategoryQuery;
import net.maku.module.vo.AgCategoryVO;

import java.util.List;


public interface AgCategoryService extends BaseService<AgCategoryEntity> {


    PageResult<AgCategoryVO> getCategoryList(AgCategoryQuery query);

    Result<PageResult<AgCategoryVO>> getCategoryListByUser(Integer websiteId,
                                                     long userId,
                                                     Integer pageNum,
                                                     Integer pageSize,String approveState);

    void addCategoryList(AgCategoryVO vo);

    void updateCategoryList(AgCategoryVO vo);

    void deleteCategoryList(List<Long> idList);

    Result<PageResult<AgCategoryVO>> getCategoriesByWebsiteId(Integer websiteId, Integer pageNum, Integer pageSize);

    List<AgCategoryVO> getSubCategories(Integer parentId,Integer type);

    int addParentCategory(AgCategoryEntity entity);

    int addChildCategory(AgCategoryEntity entity);

    int updateParentCategory(Long categoryId, AgCategoryVO categoryVO);

    int updateChildCategory(Long categoryId, AgCategoryVO categoryVO);

    int deleteChildCategory(Long categoryId);

    int deleteParentCategory(Long categoryId);

    List<AgCategoryVO> getParents(HttpServletRequest request,Integer websiteId);

    Result<List<AgCategoryVO>> getCategoriesAll(Integer websiteId);

    int updateCategoryImage(Long categoryId, String url);
}
